package com.cupk.service;

import com.cupk.common.Result;
import com.cupk.entity.Admin;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.cupk.common.PageResult;
import com.cupk.dto.AdminDto;



public interface AdminService {

    Admin getUserByUsernameAndPassword(String idCard, String password);
    boolean isValidPhoneNumber(String phoneNumber);
    public Result sendTeleCodeToAdmin(String tele, HttpServletResponse response) throws Exception ;
    public  String generateCode();
    String getAdminName(HttpServletRequest request);
    Result loginByPassword(String idCard, String password, HttpServletResponse response);
    boolean addAdmin(Admin admin,  HttpServletResponse response) throws Exception;
    public String createMagicCode(HttpServletRequest request, Integer level);
    public Result analyseInviteCode(String inviteCode, HttpServletRequest request);

    /**
     * "相关同事"分页查询
     * @param id 管理员编号
     * @param name 管理员姓名
     * @param tele 管理员联系方式
     * @param page 页码
     * @param pageSize 每页返回的数据条目数
     * @return
     */
    PageResult<AdminDto> getAdminPage(Integer id, String name, String tele, int page, int pageSize);


}
